package com.example.demo.controller.equipment;

import com.example.demo.domain.equipment.Attachment;
import com.example.demo.service.equipment.AttachmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping
@CrossOrigin
public class AttachmentController {
    @Resource
    @Autowired
    private AttachmentService attachmentService;

    @PostMapping(value = "/add-attachment")
    public Attachment addAttachment(@RequestBody Attachment attachment) {
        return attachmentService.addattachment(attachment);
    }
}
